<?php

/**
 * Description of OSregister
 *
 * @author GodSon
 */
class OSregister extends CI_Controller {

    function index() {
        $this->load->view('register');
    }

    function register() {
        $this->load->model("Os_register");
        $result = $this->Os_register->register();
        
        if ($result) {
            echo "success";
        } else {
            echo "error";
        }
    }
    
     /**
     *  用户名唯一性检测
     * @return type 
     */
    function checkNameUni(){
        $this->load->model("Os_register");
        $result = $this->Os_register->checkNameUni();
         if ($result > 0) {
            echo "false";
        } else {
            echo "true";
        }
    }

}

?>
